package com.adeng.springbootdemo.hello.controller.service;

import com.adeng.springbootdemo.annotation.MvcControllerMethodLog;
import com.adeng.springbootdemo.annotation.Sentinelmonitor;
import com.adeng.springbootdemo.exception.MyException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author hzwengcheng 2018-05-12 21:08
 */
@Service
@Slf4j
public class TestService {


    @Sentinelmonitor(bizName = "home 接口", isAllReturn = true, ignoreExceptions = {MyException.class})
    @MvcControllerMethodLog
    public Boolean testNeteaseSentinel(String argStr) {
        if (argStr == null) {
            System.out.println("testNeteaseSentinel 返回 true");
            return true;
        } else {
            System.out.println("testNeteaseSentinel 返回 false");
            return false;
        }
    }
}
